Re: Suggestion for optimization

Поиск
Список
Период
Сортировка
От Peter Bierman
Тема Re: Suggestion for optimization
Дата
Msg-id v03130301b8d3bfb83d00@[17.202.21.231]
обсуждение исходный текст
Ответ на Re: Suggestion for optimization  ("Dann Corbit" <DCorbit@connx.com>)
Ответы Re: Suggestion for optimization  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At 12:08 PM -0800 4/5/02, Dann Corbit wrote:
>I guess that this model can be viewed as "everything is a snapshot".
>It seems plain that the repercussions for a data warehouse and for 
>reporting have not been thought out very well.  This is definitely
>very, very bad in that arena.  I suppose that reporting could still
>be accomplished, but it would require pumping the data into a new
>copy of the database that does not allow writes at all.  Yuck.

That is exactly the point of MVCC. When you start your reporting cycle, you initiate a transaction. That transaction
causesthe database to _act_ as if you had "pump[ed] the data into a new copy of the database that does not allow writes
atall."
 

Your transaction is isolated from ongoing activities in the database. Your transaction _is_ a snapshot of the database
atsome instant in time.
 

This is a good thing. You should probably ponder it for a while before claiming it hasn't been thought out well wrt.
certainapplications.
 


Still, your suggestion _could_ be implemented. Your comment: "An accurate
cardinality figure can greatly enhance the optimizer's ability to
perform joins in the correct order" was intriguing, and I'd be interested in Tom's thoughts on just that bit.

-pmb




В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: Suggestion for optimization
Следующее
От: "Dann Corbit"
Дата:
Сообщение: Re: Suggestion for optimization